﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 圆心计算器
{
    public class Location
    {
        public Location() { }
        public Location(double x,double y) {
            this._x = x; this._y = y;
        }
        private double _x; private double _y;

        public double X { get { return _x; } set { _x = value; } }
        public double Y { get { return _y; } set { _y = value; } }
    }

    public class Vector {
        public Vector() { }
        public Vector(Location start,Location end) {
            this._x = end.X-start.X;
            this._y = end.Y-start.Y;
            this.Length = Math.Sqrt((_x * _x) + (_y * _y));
        }

        private double _x; private double _y;private double _length;

        public double Length { get { return _length;  } set { _length = value; } }
        public double X { get { return _x; } set { _x = value; } }
        public double Y { get { return _y; } set { _y = value; } }

    }
}
